package exam.business.service;

import exam.common.constant.ResultPort;
import exam.common.key.KeySubQuestion;
import exam.common.util.LongUtils;
import exam.model.dao.TSubQuestionDAO;
import exam.system.business.AbstractService;
import exam.system.business.BusinessServiceInfo;
/**
 * <p>SubQuestionDeleteService</p>
 * 
 * @author Phong
 * @version (create: 19/05/2012) (update: 21/5/2012) 
 */
public class SubQuestionDeleteService extends AbstractService {
	private TSubQuestionDAO tSubQuestionDAO = new TSubQuestionDAO();
	@Override
	public String executeService(BusinessServiceInfo serviceInfo)
			throws Exception {
		// lay subQuestId tu serviceInfo
		String subQuestId = serviceInfo.getString(KeySubQuestion.SUB_QUEST_ID);
		tSubQuestionDAO.deleteSubQuestion(LongUtils.convertStringToLong(subQuestId));
		return ResultPort.SUCCESS;
	}

}
